package com.teaching.teachingsupport.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.teaching.teachingsupport.common.pojo.dataobject.MajorDirection;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface MajorDirectionMapper extends BaseMapper<MajorDirection> {
    
    /**
     * 根据专业名称获取专业ID
     *
     * @param name 专业名称
     * @return 专业ID，如果不存在返回null
     */
    @Select("SELECT direction_id FROM major_direction WHERE name = #{name}")
    Long getMajorIdByName(String name);
} 